import request from '@/utils/request'

// 获取设计师日程列表
export function getScheduleList(params) {
  return request({
    url: '/designer/schedules',
    method: 'get',
    params
  })
}

// 获取设计师日程详情
export function getSchedule(id) {
  return request({
    url: `/designer/schedules/${id}`,
    method: 'get'
  })
}

// 添加设计师日程
export function addSchedule(data) {
  return request({
    url: '/designer/schedules',
    method: 'post',
    data
  })
}

// 更新设计师日程
export function updateSchedule(id, data) {
  return request({
    url: `/designer/schedules/${id}`,
    method: 'put',
    data
  })
}

// 取消设计师日程
export function cancelSchedule(id, reason) {
  return request({
    url: `/designer/schedules/${id}/cancel`,
    method: 'post',
    data: { reason }
  })
}

// 删除设计师日程
export function deleteSchedule(id) {
  return request({
    url: `/designer/schedules/${id}`,
    method: 'delete'
  })
} 